<template>
  <view>
    <navbar fixed leftIcon="left" title="CHB" shadow></navbar>

    <view class="view align-center justify-center">
      <view style="background:#4E6BF6;border-radius:50%;" class="w60 h60 m-b-14 m-t-25"></view>
      <view class="bold c_071 fz-16 m-b-40">CHB</view>
    </view>

    <view
      class="p-t-21 p-b-21 p-l-15 p-r-15 bg-fff m-l-18 m-r-18 m-t-12 m-b-15"
      style="border-radius: 19px"
    >
      <view class="bold c-0D1 fz-18 text-center m-b-20">基本信息</view>

      <view class="view flex-row align-center justify-between  b-b-1 h42">
        <view class="c-0D1 fz-12 w60">项目名称</view>
        <view class="c-0D1 fz-12 w200 text-right"
          >Dashixiong Shenlong</view
        >
      </view>

      <view class="view flex-row align-center justify-between h42 b-b-1">
        <view class="c-0D1 fz-12 w60">官网</view>
        <view class="c_678 fz-12 w200 text-right" 
          >https://cn.pornhub.c</view
        >
      </view>

      <view class="view flex-row align-center justify-between  b-b-1 h42">
        <view class="c-0D1 fz-12 w60">合约地址</view>
        <view class="c-0D1 fz-12 w200 text-right"
          >Dashixiong Shenlong</view
        >
      </view>

      <view class="view flex-row align-center justify-between   h42">
        <view class="c-0D1 fz-12 w60">第三方评级</view>
        <view class="c-0D1 fz-12 w200 text-right"
          >A+</view
        >
      </view>
    </view>

    <view
      class="p-t-21 p-b-21 p-l-15 p-r-15 bg-fff m-l-18 m-r-18 m-b-15"
      style="border-radius: 19px"
    >
      <view class="bold c-0D1 fz-18 text-center m-b-20">发行信息</view>

      <view class="view flex-row align-center justify-between  b-b-1 h42">
        <view class="c-0D1 fz-12 w60">发行时间</view>
        <view class="c-0D1 fz-12 w200 text-right"
          >-</view
        >
      </view>

      <view class="view flex-row align-center justify-between h42 b-b-1">
        <view class="c-0D1 fz-12 w60">发行总量</view>
        <view class="c_678 fz-12 w200 text-right" 
          >100000000000</view
        >
      </view>

    </view>

    <view
      class=" p-l-15 p-r-15 bg-fff m-l-18 m-r-18"
      style="border-radius: 19px"
    >
      <view class="view flex-row align-center justify-between h42">
        <view class="c-0D1 fz-12 w60">发行总量</view>
        <image src="/static/img1/mywallet_icon_more_default.png"  class="w25 h25"/>
      </view>
    </view>

  </view>
</template>

<script>
import liuyunoTabs from "@/components/liuyuno-tabs/liuyuno-tabs.vue";
import navbar from "@/components/uni-nav-bar";
import noData from "@/components/noData/noData";
import sibList from "@/components/sib-list/sib-list.vue";
export default {
  components: {
    noData,
    sibList,
    navbar,
    liuyunoTabs,
  },
  data() {
    return {
      tabs: ["投票收益", "发放记录", "发放记录"],
      defaultIndex: 0,
      active: 0,
      list: [],
      page: 1,
      rows: 10,
      total: 0,
      more: "more",
      items: [
        { name: "已完成", key: 0 },
        { name: "已作废", key: 1 },
      ],
      showSelect: false,
    };
  },

  mounted() {
    this.getList(true);
  },
  methods: {
    hideSelect() {
      this.$refs.selector.bodyCloseMenus();
    },
    touchstart: function (e) {
      this.$refs.sibList.refreshStart(e);
    },
    touchmove: function (e) {
      this.$refs.sibList.refreshMove(e);
    },
    touchend: function (e) {
      this.$refs.sibList.refreshEnd(e);
    },
    getScrollH() {
      return uni.getSystemInfoSync() - 80 + "px";
    },
    isRefresh: function () {
      const _this = this;
      setTimeout(() => {
        uni.showToast({
          icon: "success",
          title: "刷新成功",
        });
        // const defaultData = [
        // 	'初始数据1', '初始数据2', '初始数据3', '初始数据4',
        // 	'初始数据5', '初始数据6'
        // ]
        // _this.list = defaultData
        this.getList(true, () => {
          this.$refs.sibList.endAfter();
        });
        // 刷新结束调用
      }, 1000);
    },
    scrolltolowerFn: function () {
      if (this.list.length == this.total) {
        return false;
      }
      uni.showLoading({
        title: "加载中...",
        mask: true,
      });
      // 模拟请求
      const _this = this;
      setTimeout(() => {
        // 请求成功
        this.getList(null, () => {
          uni.hideLoading();
        });
      }, 1000);
    },
    changeIndex(i) {
      this.active = i;
      this.getList(true);
    },
    getList(isReflush, cb) {
      if (isReflush) {
        this.page = 1;
      } else {
        this.page++;
      }
      this.app.post(
        {
          data: {
            status: this.active + 1,
            page: this.page,
            limit: this.rows,
          },
          url: "index.php/api/index/getOrderLogData",
        },
        (res) => {
          if (cb) {
            cb();
          }
          if (res.data && res.data.data) {
            if (this.page == 1) {
              this.list = res.data.data.value;
              if (res.data.count) {
                this.total = res.data.count.value;
              }
            } else {
              this.list = [...this.list, ...res.data.data.value];
            }
          }
        }
      );
    },
    onNavigationBarButtonTap(e) {
      if (e.index == 0) {
        this.showSelect = true;
      }
    },
  },
};
</script>

<style lang="scss" scoped>
page {
  background-color: #f6f6f6;
  box-sizing: border-box;
  overflow-y: hidden;
}
.b-b-1 {border-bottom: 1px solid #EDEDED;}
.bo {
  border: 2px solid #343438;
}
.show-detail {
  border-radius: 60rpx;
}
/deep/.auto-h {
  height: calc(100vh - 220rpx) !important;
}
.autoH {
  height: calc(100vh - 220rpx);
}
.bor-line {
  width: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    #ffffff 50%,
    rgba(255, 255, 255, 0) 100%
  );
  opacity: 0.3;
  height: 1px;
}
/deep/.auto-h {
  height: calc(100vh - 90rpx) !important;
}
.bgs {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
</style>
